﻿using System;

namespace ErgoBreak.Core
{
    internal interface IBreakManager
    {
        #region Events
        /// <summary>
        /// Happens when a break is started.
        /// </summary>
        event EventHandler BreakStarted;

        /// <summary>
        /// Happens when a break is ended.
        /// </summary>
        event EventHandler BreakEnded;

        /// <summary>
        /// Occurs when a break is canceled.
        /// </summary>
        event EventHandler BreakCanceled;

        /// <summary>
        /// Occurs when a break is snoozed. 
        /// </summary>
        event EventHandler Snoozed;

        /// <summary>
        /// Occurs when a break snooze is over
        /// </summary>
        event EventHandler SnoozeElapsed;
        #endregion

        #region Properties
        /// <summary>
        /// Gets the current 'Break' instance.
        /// </summary>
        Break CurrentBreak
        {
            get;
        }
        #endregion

        #region Methods
        /// <summary>
        /// Starts a break lasting for the given time.
        /// </summary>
        /// <param name="breakDuration">Defines how long the break should last in minutes.</param>
        void StartBreak(Break breakObject, IBreakAction breakAction);

        /// <summary>
        /// Postpones the current break for the given time.
        /// </summary>
        /// <param name="delayTime">Defines how long the break should be delayed in minutes.</param>
        void Snooze(int delayTime);

        /// <summary>
        /// Cancels the current break
        /// </summary>
        void CancelBreak();
        #endregion
    }
}
